# Step 1: Installing Compose in the cluster

This topic describes how to install Compose in a high availability cluster environment.

## Preparation

Allocate two shared folders for Compose: one for the Compose server and the other for the Compose agent

The setup instructions below assume that the Compose data folder is F:\Compose-server-data and the Compose Agent data folder is F:\Compose-agent-data.

## Primary node setup

1. Install Compose.

2. Generate a 32 character random master key by running the following command from &lt;PRODUCT\_DIR&gt;\bin:

   ComposeCtl.exe utils genpassword

   The setup instructions below assume that your key is

   WdAHWEwXSvwxDFetcl7TVVFfSXPbMrFx

3. Stop the Compose service.

4. Edit the service executable path as follows:

   SC CONFIG QlikCompose binPath= "&lt;PRODUCT\_DIR&gt;\bin\ComposeCtl.exe -d F:\server-server-data service run”

   Example:

   SC CONFIG QlikCompose binPath="\"C:\Program Files\Qlik\Compose\bin\ComposeCtl.exe\" -d \"F:\Compose-server-data\" service run"

5. Run the following commands from &lt;PRODUCT\_DIR&gt;\bin:

   ComposeCtl.exe -d "F:\Compose-server-data" setup install

   ComposeCtl.exe -d "F:\Compose-server-data" masterukey set -p WdAHWEwXSvwxDFetcl7TVVFfSXPbMrFx

6. Edit &lt;PRODUCT\_DIR&gt;\java\bin\acjs.bat and immediately below the line with SET JAVA\_LIB\_PATH, add the following:

   set AT\_DATA=-d F:\Compose-agent-data

7. Start the Compose service and then stop it. This will create the java repository.

   Information note

   This step should be performed on the primary node only.

8. Run the following command from &lt;PRODUCT\_DIR&gt;\java\bin:

   acjs.bat masterukey set WdAHWEwXSvwxDFetcl7TVVFfSXPbMrFx

9. Start the Compose service and then stop it.

10. In the Cluster Manager, move to the secondary node.

## Secondary node setup

1. Install Compose.

2. Stop the Compose service.

3. Edit the service executable path as follows:

   SC CONFIG QlikCompose binPath= "&lt;PRODUCT\_DIR&gt;\bin\ComposeCtl.exe -d F:\server-server-data service run”

   Example:

   SC CONFIG QlikCompose binPath="\"C:\Program Files\Qlik\Compose\bin\ComposeCtl.exe\" -d \"F:\Compose-server-data\" service run"

4. Run the following commands from &lt;PRODUCT\_DIR&gt;\bin:

   ComposeCtl.exe -d "F:\Compose-server-data" setup install

   ComposeCtl.exe -d "F:\Compose-server-data" masterukey set -p WdAHWEwXSvwxDFetcl7TVVFfSXPbMrFx

5. Edit &lt;PRODUCT\_DIR&gt;\java\bin\acjs.bat and immediately below the line with SET JAVA\_LIB\_PATH, add the following:

   set AT\_DATA=-d F:\Compose-agent-data

6. Run the following command from &lt;PRODUCT\_DIR&gt;\java\bin:

   acjs.bat masterukey set WdAHWEwXSvwxDFetcl7TVVFfSXPbMrFx

7. Start the Compose service and then stop it.

8. In the Cluster Manager, move to the next nodes if your cluster has more than two nodes.